package feature;

import sun.rmi.runtime.Log;

/**
 * Decription
 * Date 2017/10/7 11:29
 * authur MangoDai
 **/
public class IntegerTests {
    public static void main(String[] args) {
        Integer a = 1;
        Integer b = 2;
        Integer c = 3;
        Integer d = 3;
        Integer e = 321;
        Integer f = 312;
        Long g = 3l;
        System.out.println("c==d = " + (c == d)); // true -128 127
        System.out.println("e==f = " + (e == f)); // false 321
        System.out.println("c.equals(a + b) = " + c.equals(a + b)); // true 3 = 3
        System.out.println("g == (a+b) = " + (g == (a + b)));// true 自动装箱 在同一范围
        System.out.println("g.equals(a + b) = " + g.equals(a + b)); // true 本质是Long 对比 Integer
    }
}
